/*
 * Module  : SSD1289.h
 *
 * Created: 22.01.2014 21:40:59
 * Author: Siliconsoul
 */


#ifndef SSD1289_H_
#define SSD1289_H_

#define LEFT    0
#define RIGHT   9999
#define CENTER  9998

#define PORTRAIT    0
#define LANDSCAPE   1

#define ASPECT_4x3	0
#define ASPECT_16x9	1

#include <stdint.h>

typedef struct
{
    uint8_t* font;
    uint8_t x_size;
    uint8_t y_size;
    uint8_t offset;
    uint8_t numchars;
}  _current_font;

void ssd1289_init(uint8_t orientation, uint8_t aspect);
void ssd1289_clrScr();
void ssd1289_drawPixel(int x, int y);
void ssd1289_drawLine(int x1, int y1, int x2, int y2);
void ssd1289_fillScr(uint8_t r, uint8_t g, uint8_t b);
void ssd1289_drawRect(int x1, int y1, int x2, int y2);
void ssd1289_drawRoundRect(int x1, int y1, int x2, int y2);
void ssd1289_fillRect(int x1, int y1, int x2, int y2);
void ssd1289_fillRoundRect(int x1, int y1, int x2, int y2);
void ssd1289_drawCircle(int x, int y, int radius);
void ssd1289_fillCircle(int x, int y, int radius);
void ssd1289_setColor(uint8_t r, uint8_t g, uint8_t b);
void ssd1289_setBackColor(uint8_t r, uint8_t g, uint8_t b);
void ssd1289_print(char *st, int x, int y, int deg);
void ssd1289_printNumI(long num, int x, int y);
void ssd1289_printNumF(double num, uint8_t dec, int x, int y);
void ssd1289_setFont(const uint8_t* font);
void ssd1289_drawBitmap(int x, int y, int sx, int sy, unsigned int* data, int scale);
void ssd1289_drawBitmapR(int x, int y, int sx, int sy, unsigned int* data, int deg, int rox, int roy);

#endif /* SSD1289_H_ */